import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooWechatMiniappVersionController } from '../../../controllers';
const uctoowechatMiniappVersionRouter = new Router();
const wechatMiniappVersionController = new uctooWechatMiniappVersionController();

uctoowechatMiniappVersionRouter.post('/add', requireUser, wechatMiniappVersionController.add);
uctoowechatMiniappVersionRouter.post('/edit', requireUser, rowLevelPermission('uctoo/wechat_miniapp_version'), wechatMiniappVersionController.edit);
uctoowechatMiniappVersionRouter.post('/del', requireUser, rowLevelPermission('uctoo/wechat_miniapp_version'), wechatMiniappVersionController.delete);

//For getting wechatMiniappVersion with permission control
uctoowechatMiniappVersionRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/wechat_miniapp_version'), wechatMiniappVersionController.getSingle);
uctoowechatMiniappVersionRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/wechat_miniapp_version'), wechatMiniappVersionController.getMany);
uctoowechatMiniappVersionRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/wechat_miniapp_version'), wechatMiniappVersionController.getMany);

//#endregion AutoCreateCode
export default uctoowechatMiniappVersionRouter;
